export const constRoutes = [
    {
        path: '/login',
        component: ()=> import('@/views/login/index.vue'),
        name: 'login',
        meta: {
            hidden: true, //路由的标题在菜单中是否隐藏
        },
    },
    {
        path: '/',
        component: () => import('@/layout/index.vue'),
        redirect: '/home',
        name: 'layout',
        meta: {
            icon: 'Avatar',
        },
        children: [
            {
                path: '/home',
                component: () => import('@/views/home/index.vue'),
                name: 'home',
                meta: {
                    title: '首页', //菜单标题
                    icon: 'HomeFilled',
                }
            }
        ]
    },
    {
        path: '/acl',
        component: () => import('@/layout/index.vue'),
        redirect: '/acl/user',   //用于面包屑点击跳转到第一个孩子
        name: 'Acl',
        meta: {
            title: '权限管理',
            icon: 'Lock',
        },
        children: [
            {
                path: '/acl/user',
                component: () => import('@/views/acl/user/index.vue'),
                name: 'User',
                meta: {
                    title: '用户管理',
                    icon: 'User',
                },
            },
            {
                path: '/acl/role',
                component: () => import('@/views/acl/role/index.vue'),
                name: 'Role',
                meta: {
                    title: '角色管理',
                    icon: 'UserFilled',
                },
            },
            {
                path: '/acl/permission',
                component: () => import('@/views/acl/permission/index.vue'),
                name: 'Permission',
                meta: {
                    title: '菜单管理',
                    icon: 'Monitor',
                },
            },
        ],
    },
    {
        path: '/404',
        component: ()=> import('@/views/404/index.vue'),
        name: '404',
        meta: {
            hidden: true, //路由的标题在菜单中是否隐藏
        },
    },
    //上面路由都不对，匹配下面路由
    {
        path: '/:pathMatch(.*)*',
        redirect: '/404',
        name: 'Any',
        meta: {
            hidden: true, //路由的标题在菜单中是否隐藏
        },
    },
]
